-
Notifications
You must be signed in to change notification settings - Fork 537
refactor: use XDG_CACHE_HOME for default cache directory #5083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@terriko what do you think? |
This looks promising! I've approved the tests to run, but they'll likely fail because we've got a broken cache in our CI system at the moment. While we're working on getting that fixed, some thoughts:
|
db5713f
to
592158e
Compare
@terriko I rebased my branch on main and added tests for |
Thanks! I'll get the tests running again. Our cache issue is resolved so if they don't all pass this time, do take a look to see if you need to fix something. |
0b04605
to
e77a861
Compare
@terriko I forgot to run linters locally on a test file - my bad. I also fixed the tests so they will work on Windows properly. I noticed that:
Shall I do anything about these? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is looking great!
If you could add XDG
into .github/actions/spelling/allow.txt
that should clear up the spelling error and I think we can get this merged. I think the other test fail is unrelated so don't worry about it.
Update the tool to determine the default cache directory using the XDG_CACHE_HOME environment variable, falling back to ~/.cache if unset. This brings the tool in line with the XDG Base Directory Specification. Move cache-related default values into a new `database_defaults.py` module to centralize configuration and improve code maintainability. Add a test to verify environment-sensitive cache directory behavior. Update the MANUAL to document the new cache path logic. These changes improve compatibility with diverse environments and promote cleaner filesystem usage. Signed-off-by: Rafal Ilnicki <[email protected]>
e77a861
to
4b06128
Compare
Update the tool to determine the default cache directory using the XDG_CACHE_HOME environment variable, falling back to ~/.cache if unset. This brings the tool in line with the XDG Base Directory Specification.
Move cache-related default values into a new
database_defaults.py
module to centralize configuration and improve code maintainability.These changes improve compatibility with diverse environments and promote cleaner filesystem usage.